<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<link href="common/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="common/common.js"></script>
<script type="text/javascript">
function doAfterClose(uploadframe){
	var upload_file = document.getElementById("uploadFile");
	var return_value = uploadframe.contentWindow.document.getElementById("retValue");
    if(return_value!=null)
    {
	upload_file.value = return_value.value;
	}
}
</script>
</head>
<body>
<div id="leftlayout">
<table class="input-table" width="500" align="center">
	<thead>
		<tr>
			<td colspan="2">文件上传demo</td>
		</tr>
	</thead>
	<tbody>

		<tr>
			<td class="column">软件名称</td>
			<td class="value">测试软件</td>
		</tr>
		<tr>
			<td class="column">软件描述</td>
			<td class="value">华夏软件生产</td>
		</tr>
		<tr>
			<td class="column">附件</td>
			<td class="value"><input id="uploadFile" name="uploadFile"
				type="text" style="float: left; position: relative; top: 3px"
				size="45" readonly value=""><a class="tablebutton" href="#"
				onclick="javascript:				
				showmodaldiv('','600','400','CommonFileUploadAction.do?topic=book&relatedTo=11', doAfterClose)">查看...</a></td>
		</tr>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="2"></td>
		</tr>
	</tfoot>
</table>
</div>
<div>
			通过把被关联对象（添加附件的对象）的类型（topic）以及主键(relatedTo)作为参数<br>
			传递给按钮的onclick事件，onclick="javascript:
			showmodaldiv('','600','400','CommonFileUploadAction.do?topic=book&amp;relatedTo=11',
			doAfterClose)"<br>
			就可以出现通用文件上传界面</div>

</body>
</html>
